#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""

@author ：chenzf
@date ：2024/4/23 下午10:02 
"""
import random
import time
from random import Random
from threading import Thread


def dance(msg):
    while True:
        print(msg)
        time.sleep(Random.randrange(Random(),start=1,stop=3))
def sing(msg):
    while True:
        print(msg)
        time.sleep(Random.randrange(Random(),start=1,stop=3))
# 创建线程
Thread(target=dance,args=("这是dance线程",)).start()
Thread(target=sing,kwargs={"msg":"这是sing线程"}).start()
